/**
 * Copyright (C) 2002-2006 WUZEWEN. All rights reserved.
 * WUZEWEN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.kingcore.director;

import java.awt.Color;
import java.util.HashMap;
import java.util.Map;

import com.kingcore.framework.BaseConstants;

/**
 * <p>Some Constants for director application.</p>
 * @author	WUZEWEN on 2006-05-17
 * @version	1.0
 * @see		Object#equals(java.lang.Object)
 * @see		Object#hashCode()
 * @see		HashMap
 * @since	JDK5
 */

public class DirectorConstants extends BaseConstants {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public DirectorConstants() {
		super();
	} 
	
	static{
	} 

	/******************************************************************
	 Constants for System Level inherit from super class.
	******************************************************************/
	public static int Min_TableColumn_Width = 50;  //override
	public static int Table_TimeColumn_Width = 130;  //时间列宽度
	public static int Table_HalfHiddenColumn_Width = 0;  //半隐藏列宽
	
	/************* Constants for Local Search ***********************/
	public static String Local_File_Search_Excluded="localFileSearchExcluded";

	public static String Ad_Index_Url = null;
	public static Integer Ad_Fetch_Interval = 1; //munite
	
	public static String Ad_Block_StatusBar = "stabar";
	public static String Ad_Block_AwokeMsg = "awkmsg";
	public static String Ad_Block_AwokeEdit = "awkedt";
	
	/******************************************************************
						 Constants only for Director System
	******************************************************************/
	public static final int File_Type_Folder = 0;
	public static final int File_Type_File   = 1;
	
	/** 发送邮件代理类型  */
	public final static String Net_Mail_ProxyTppe ="conf.mail.proxyType";
	/** 发送邮件代理IP */
	public final static String Net_Mail_ProxyIp   ="conf.mail.proxyIP";
	/** 发送邮件代理端口 */
	public final static String Net_Mail_ProxyPort ="conf.mail.proxyPort";
	public static final String Net_Mail_ProxyUser = "conf.mail.proxyUser";
	public static final String Net_Mail_ProxyPass = "conf.mail.proxyPass";

	/** 缺省邮件帐户 */
	public final static String Default_eMail      = "default.eMail";
	public final static String Default_FileCopy   = "default.file.copy";
	public final static String Default_FileBackup = "default.file.backup";

	/** 用户数据路径 */
	public final static String Director_UserData_Path_Key="director.userdata.path";
	public final static String Director_HotKey_OpenMainFrame_Key="Director_HotKey_OpenMainFrame";
	public final static String Director_HotKey_OpenMiniWindow_Key="Director_HotKey_OpenMiniWindow";

	public final static String System_Default_Open_Panel_Key="System_Default_Open_Panel";
	public final static String System_Default_SearchEngine_Key="System_Default_SearchEngine";
	
	public final static String System_CloseAction_Key = "System_CloseAction_Key";
	public final static String System_CloseAction_Minimize = "1"; //1:最小化;0:退出
	public final static String System_CloseAction_Close = "0";
	public static String System_CloseAction_Value = null;
	
	//Key-Value-DefaultValue  //一种方式放在DirectorContext中做getter，一种方式放在DirectorConstants中做属性。
	public final static String MinimizeFrame_After_OpenFileOrFolder_Key="MinimizeFrame_After_OpenFileOrFolder_Key";
	public final static String MinimizeFrame_After_OpenFileOrFolder_Default = "1";
	public static String MinimizeFrame_After_OpenFileOrFolder_Value = null;

	//启动后最小化
	public final static String Director_MinedAfterStartup_Key ="director.MinedAfterStartup"; //启动后最小化
	public final static String Director_MinedAfterStartup_Default="1";

	//ValueList-DefaultValue
	public final static String AwokeStyle_MsnTips = "AwokeStyle_MsnTips";
	public final static String AwokeStyle_Normal = "AwokeStyle_Normal";
	public final static String AwokeStyle_Default = DirectorConstants.AwokeStyle_MsnTips;  //default value for null or not select
	
	public final static String Key_NotePaper_Content = "-1";  //文章表中-1为NotePaper
	
	// DirectorContext.isAwokeCloseEnabled();
	public final static String Director_Reminder_AwokeCloseEnable="director.reminder.awokeCloseEnabled";

	public final static int FavoriteFiles_ClassId_Recent = -1;//最近常用的
	public final static int FavoriteFiles_ClassId_Recent_Doc = -2;
	public final static int FavoriteFiles_ClassId_Recent_Pro = -3;
	public final static int FavoriteFiles_ClassId_All = 1;
	public final static int FavoriteFiles_ClassId_Doc = 2;
	public final static int FavoriteFiles_ClassId_Pro = 3;
	public final static int FavoriteFiles_ClassId_Default = FavoriteFiles_ClassId_Recent;
	
	/* table name list 表名定义为常量，便于利用工具重构，比如rename tables */
	public final static String SYS_Class = "SYS_Class";
	public final static String SYS_Setting = "SYS_Setting";
	public final static String SYS_EMmail = "SYS_EMmail";
	
	public final static String RMD_Awoke = "RMD_Awoke";
	public final static String RMD_Awoke_Class = "RMD_Awoke_Class";
	public final static String RMD_Awoke_Class_Relation = "RMD_Awoke_Class_Relation";
	
	public final static String FMT_FileBackup = "FMT_FileBackup";
	public final static String FMT_FileCopy =   "FMT_FileCopy";
	public final static String FMT_FileCopy_Class = "FMT_FileCopy_Class";
	public final static String FMT_FavoriteFiles = "FMT_FavoriteFiles";
	public final static String FMT_FavoriteFiles_Class = "FMT_FavoriteFiles_Class";

	public final static String NBK_ArticleContent = "NBK_ArticleContent";
	public final static String NBK_ArticleContent_Class = "NBK_ArticleContent_Class";
	public final static String NBK_ArticleContent_Class_Relation = "NBK_ArticleContent_Class_Relation";
	
	
	/******************************************************************
						 Constants for Reminder
	******************************************************************/
	
	/** 文件备份设置 */
	public static final String File_Backup_CurrentSort = "file.backup.currentSort";
	public static final String File_Backup_Interval = "file.backup.interval";
	public static final String File_Backup_DestPath = "file.backup.destPath";
	public static final String File_Backup_Time = "file.backup.time";
	public static final String File_Backup_Interv = "file.backup.interv";
	public static final String File_Copy_Not_Include_File_Extends = "file_copy_not_include_file_extends";
	public static final String File_Copy_Not_Include_Folders = "file_copy_not_include_folders";
	
	public static void main(String[] args) {
		System.out.println( DirectorConstants.Times_Week );
		System.out.println( DirectorConstants.Times_Month );
		System.out.println( DirectorConstants.Times_Year );
	}

	/**
	 * 间隔单位类型及相关 - begin
	 */
	//Map( code, offset)
	public final static Map<String,Long> intervalUintsOffsetMap = new HashMap<String,Long>();
	//Map( code, name)
	public final static Map<String,String> intervalUintsNameMap = new HashMap<String,String>();
	/** time value */
	public final static long Times_Minute = 1000L*60;
	public final static long Times_Hour   = 1000L*60*60;
	public final static long Times_Day    = 1000L*60*60*24;
	public final static long Times_Week   = 1000L*60*60*24*7;
	public final static long Times_Month  = 1000L*60*60*24*30;  //?wzw: 1000*60*60*24*30 is error?
	public final static long Times_Year   = 1000L*60*60*24*365;
	// 对于有某些对应关系的枚举值，使用"二维数组 + Index定义 + Map缓存"要比单独定义所有枚举值更好，因为体现了对应关系，可避免代码中每次转换
	public final static String[][] IntervalUints = {
		{"minute",  "hour",  "day",  "week",  "month",  "year"},
		{"分钟", "小时", "天", "周", "月", "年"},
		{Times_Minute+"", Times_Hour+"", Times_Day+"", Times_Week+"", Times_Month+"", Times_Year+""} };
	public final static int IntervalUints_Index_Code  = 0;
	public final static int IntervalUints_Index_Name  = 1;
	public final static int IntervalUints_Index_Offset = 2;
	/**
	 * 间隔单位类型及相关 - end
	 */
	
	public static final Color Color_ZebraCross = new Color(229, 239, 239);  //默认斑马线颜色RGB(206,235,206),RGB(229, 239, 239)
	public static final Object Program_Exts = "'.exe','.bat','.cmd'";   //程序文件的扩展名,不分大小写
	
	public static String[][] Data_AwokeTypes = new String[][]{
		{"00","我的提醒"},
		{"0000","普通提醒"},
		{"0001","重要提醒"},
		{"0002","生日"},
		{"0003","日程、计划"},
		{"0004","约会"},
		{"0005","其他"},
		{"99","垃圾箱"}};
	
	public static String Default_Current_SearchEngine = "baiduSearch";  //默认使用百度搜索
	public static String[][] MainPanel_SearchEngines = new String[][]{
						new String[]{"baiduSearch","百度搜索"}
						,new String[]{"googleSearch","google 搜索"}
						};	
}

